import publishImage from '../assets/images/statu03@2x.png'
import rejectImage from '../assets/images/statu02@2x.png'
import uploadImage from '../assets/images/statu04@2x.png'

function status (statusNum) {
  switch (statusNum) {
    case '0':
      return '已发布'
    case '1':
      return '已接单'
    case '2':
      return '待审核'
    case '3':
      return '撤单'
    case '4':
      return '拒单'
    case '5':
      return '退单'
    case '6':
      return '审核通过'
    case '7':
      return '驳回'
  }
}

function noticeTitle (status) {
  switch (status) {
    case '2':
      return '审核通知'
    case '4':
      return '拒单通知'
    case '5':
      return '退单通知'
    case 'expired':
      return '逾期通知'
  }
}

function resultData (resStatus) {
  switch (resStatus) {
    case 'publish':
      return {
        text: '发布成功',
        image: publishImage,
        returnIndex: true
      }
    case 'reject':
      return {
        text: '该任务已拒绝成功，已通知经办人！',
        image: rejectImage,
        returnIndex: false
      }
    case 'return':
      return {
        text: '该任务已退还，已通知经办人！',
        image: rejectImage,
        returnIndex: false
      }
    case 'uploadSuccess':
      return {
        text: '资料已上传成功，已通知经办人',
        image: uploadImage,
        returnIndex: true
      }
  }
}
export { status, noticeTitle, resultData }
